package com.example.demo.controller;


import com.example.demo.aspject.BusinessType;
import com.example.demo.aspject.Log;
import com.example.demo.aspject.OperatorType;
import com.example.demo.entity.User;
import com.example.demo.service.impl.UserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 用户表 前端控制器
 * </p>
 *
 * @author author
 * @since 2023-09-15
 */
@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    UserServiceImpl userService;

    @Log(title = "查询",businessType = BusinessType.OTHER,operatorType = OperatorType.OTHER)
    @GetMapping("list")
    public ResponseEntity list() {
        List<User> list = userService.list();
        return ResponseEntity.ok(list);
    }
}
